<template>
  <div>
    <el-table :data="tableData" stripe style="width: 100%">
      <el-table-column prop="id" label="id" width="180"> </el-table-column>
      <el-table-column prop="username" label="姓名" width="180"> </el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
    data() {
        return {
            // tableData: []
        }
    },
    computed: {
        tableData() {
            return this.$store.getters.userList
        } // 用户数据
    },
    created() {
        this.$store.dispatch('user/userList', 'user')
    }
};
</script>
